//
//  TabScrollView.h
//
//  Created by liubo on 16/3/19.
//  Copyright © 2016年 liubo. All rights reserved.
//

#import <UIKit/UIKit.h>


#define JooColor(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
#define JooFont(s) [UIFont systemFontOfSize:s]
#define ScreenW [UIScreen mainScreen].bounds.size.width
#define ScreenH [UIScreen mainScreen].bounds.size.height

@protocol TabScrollViewDelegate <NSObject>

/**
 *  选中第几个
 *
 *  @param index 索引
 */
-(void)selectedIndex:(NSInteger) index;

@end



@interface TabScrollView : UIView

@property (nonatomic, strong) id<TabScrollViewDelegate> tabDelegate;


/**
 *  添加 标题 和 视图
 *
 *  @param title
 *  @param subView
 */
-(void)addTitle:(NSString *)title withView:(UIView *)subView;

/**
 *  更新视图,在添加完成之后，再进行
 */
-(void)UpdateUI;

/**
 *  设置选项卡
 *
 *  @param index 索引
 */
-(void)setSelectedIndex:(NSInteger) index;


@end
